﻿Imports System.Xml.Serialization

<Serializable()>
Public MustInherit Class PopResponse

    ''' <summary>
    ''' 错误码
    ''' </summary>
    <XmlElement("errorCode")>
    Property ErrCode As String

    ''' <summary>
    ''' 错误描述
    ''' </summary>
    <XmlElement("errorMessage")>
    Property ErrMsg As String

    ''' <summary>
    ''' 响应原始内容
    ''' </summary>
    Property Body As String

    ''' <summary>
    ''' HTTP GET请求的URL
    ''' </summary>
    Property ReqUrl As String

    ''' <summary>
    ''' 把请求包的URL和参数、响应包的内容格式化到返回的字符串中
    ''' </summary>
    Property GetString As String

    ''' <summary>
    ''' 响应结果是否错误
    ''' </summary>
    Public ReadOnly Property IsError As Boolean
        Get
            Return String.IsNullOrEmpty(Me.ErrCode) OrElse Not Me.ErrCode.Equals("0")
        End Get
    End Property

End Class
